//
//  MyPopoverWindow.m
//  sandbox
//
//  Created by 杨岑 on 1/9/15.
//  Copyright (c) 2015 杨岑. All rights reserved.
//

#import "MyPopoverWindow.h"

@implementation MyPopoverWindow

- (id)initWithContentRect:(NSRect)contentRect
                styleMask:(NSUInteger)aStyle
                  backing:(NSBackingStoreType)bufferingType
                    defer:(BOOL)flag
{
    // Using NSBorderlessWindowMask results in a window without a title bar.
    self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
    if (self)
    {
        self.movableByWindowBackground = YES;
        // Start with no transparency for all drawing into the window
        [self setAlphaValue:1.0];
        // Turn off opacity so that the parts of the window that are not drawn into are transparent.
        [self setOpaque:NO];
    }
    return self;
}

@end
